package book;

public class BookList {
    private BOOK[] books=new BOOK[10];//定义数组来存书，这里设置存10本
    private int usedSize;//计数器，记录当前实际放的书的数目

    public BookList(){
        this.books[0]=new BOOK("三国演义","罗贯中",25,"小说");
        this.books[0]=new BOOK("红楼梦","曹雪芹",40,"小说");
        this.books[0]=new BOOK("西游记","吴承恩",33,"小说");
        usedSize=3;  //初始化，原本有3本书
    }

    public BOOK getBooks(int pos) {
        return books[pos];
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void getBooks(int pos,BOOK book){
        books[pos]=book;
    }
}
